1. Field of the Invention
Embodiments of the disclosure relate in general to the field of computers and similar technologies, and in particular to software utilized in this field. Still more particularly, it relates to controlling unauthorized access to encrypted application program code.
2. Description of the Related Art
The use of cryptographic encryption and digital signatures to control user access to sensitive applications has become increasingly common in recent years. These applications may contain application secrets such as passwords and encryption keys, either in the application code itself or in associated data. As an example, a content protection key is typically embedded within a content protection application. To avoid unauthorized access to the content protection key by a malicious user, application programmers generally encrypt the content protection key before embedding it into the application image. As a further safeguard, decryption of the content protection key is intended to be limited to authorized users or trusted applications.
However, many approaches to encryption, and key management such as those found in the ISO/IEC JTC SC27, NIST FIPS Pub 196, and ANSI X9 series of security standards only address low-level implementation guidelines, such as how to securely select the size of a modulus. As such, they fail to provide guidance for higher-level design issues, such as how to securely combine encryption and authentication. As a result, naïve combinations of encryption and authentication often provide opportunities for attacks including forgery and the stealing of secrets. Even security protocols that address high-level design issues, such as Pretty Good Privacy (PGP) and S/MIME, fail to address sophisticated attacks such as an encrypted section replacement attack.
In such an attack, a malicious user copies encrypted application program code and its associated encrypted application encryption/decryption key from an encrypted application into a new application. Then, the malicious user signs the new application with their private signature key to generate a new digital signature. A digital certificate authenticating the malicious user's public signature verification key is then combined with the new digital signature, the copied encrypted section, and the copied encrypted application decryption/decryption key to generate a signed/encrypted application for the malicious user. An attempt is then made to decrypt the encrypted section. Since the digital certificate verifies that the malicious user's public signature verification key is authentic, the encrypted section is decrypted as if the malicious user was an authorized user. In view of the foregoing, there is a need for improved protection against an encrypted section replacement attack.